import { Login } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 登录模块
 */
// 用户登录
export const loginApi = (params: Login.ReqLoginForm) => {
  return http.post<Login.ResLogin>(`/auth/login`, params, { noLoading: true }); // 正常 post json 请求  ==>  application/json
};

/**
 * @name 修改用户密码
 */
// 修改密码
export const modifyPsdApi = (params: Login.ModifyPsd) => {
  return http.post<void>(`/auth/modifyPWD`, params, { noLoading: true });
};

// 退出登录
export const logoutApi = () => {
  return http.post(`/auth/logout`);
};
